﻿using System.Collections;
using UnityEngine;

public abstract class Purpose
{
    public EnemyView enemyView;

    // 任务文本改成抽象属性，子类必须实现
    public abstract string Text { get; }

    public Purpose _nextPurpose;

    public abstract IEnumerator PurposePerformer();

    public void UpdatePurpose()
    {
        if (_nextPurpose != null)
        {
            // 这里你可以切换到下一个任务逻辑
            // 例如赋值enemyView，或其他操作
            enemyView = _nextPurpose.enemyView;
            _nextPurpose = _nextPurpose._nextPurpose;
        }
    }
    public void Setup(EnemyView view)
    {
        enemyView = view;  
    }
}